package com.dq.domain.sys.user.user.centre;

import com.dq.domain.base.BaseEntity;
import com.dq.domain.service.ServiceProject;
import com.dq.domain.sys.user.user.WxUser;
import com.dq.utils.TimeUtil;
import com.dq.vo.baseVo.VO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * @author cf
 */
@Data
@Entity
@ApiModel("会员卡服务项目关联表")
public class UserCardServiceProjectCentre extends BaseEntity implements VO.ToVO {

    @ApiModelProperty(value = "会员卡")
    @ManyToOne
    protected UserCard userCard ;
    @ApiModelProperty(value = "服务项目")
    @ManyToOne
    protected ServiceProject serviceProject ;

    @ApiModelProperty(value = "剩余充值总次数")
    @Column(columnDefinition="bigint default 0")
    protected Long count;
    @ApiModelProperty(value = "剩余赠送总次数")
    @Column(columnDefinition="bigint default 0")
    protected Long giveCount;
    @ApiModelProperty("备注")
    public String remarks;

    @Data
    @ApiModel(value = "视图")
    public static class Vo implements VO {
        protected Long id;
    }

    @Override
    public VO toVO(boolean isRecursion) {
        Vo vo = new Vo();
        vo.id = this.id;

        return vo;
    }

}
